<template>
<!-- 回复 -->
  <el-dialog
    title="回复评论"
    :visible.sync="isReply"
    width="40%"
    :before-close="cancel">
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="评论人">
          <el-input v-model="form.critic" disabled></el-input>
        </el-form-item>
        <el-form-item label="评论内容">
          <el-input v-model="form.commentContent" type="textarea" disabled></el-input>
        </el-form-item>
        <el-form-item label="回复">
          <el-input v-model="form.reply"
                    type="textarea"
                    placeholder="请输入回复内容" :autosize="{minRows: 4}" ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button class="btn" type="success" @click="confirm">确认</el-button>
          <el-button class="btn" @click="cancel">取消</el-button>
        </el-form-item>
      </el-form>
  </el-dialog>
</template>

<script>
export default {
  name: "reply",
  props: {
    isReply:{
      type: Boolean,
      default: () => {
        return false
      }
    },
  },
  data(){
    return{
      form: {
        critic:'张三',
        commentContent:'这种穿搭我太喜欢了',

      },
    }
  },
  methods:{
    //确认
    confirm(){
      this.cancel()
    },
    //取消
    cancel(){
      this.$emit('close',false);
    }
  }
}
</script>

<style lang="less" scoped>
.el-input{
  width: 100%;
}

/deep/.el-input__inner{
  width: 100%;
}
</style>
